open util/ordering[Date] as days

/**-------------**/
/** Objects **/
/**-------------**/

sig Date
{

}

/**----------------**/
/** Functions **/
/**----------------**/

fun fiveDaysLater[d: Date] : one Date 
{
	d.next.next.next.next.next
}

fun aWeekLater[d: Date] : one Date 
{
	 fiveDaysLater[d].next.next
}

fun fifteenDaysLater[d: Date] : one Date
{
	aWeekLater[aWeekLater[d]].next
}

fun tenDaysLater[d:Date] : one Date
{
	fiveDaysLater[fiveDaysLater[d]]
}

fun oneMonthLater[d:Date] : one Date
{
	  fifteenDaysLater[ fifteenDaysLater[d]]
}

/**-----------------**/
/** predicates **/
/**-----------------**/

pred tenDaysPassed
{
	some d, d' :Date | d' = tenDaysLater[d]
}

pred aMonthPassed
{
	some d, d' :Date | d' = oneMonthLater[d]
}

/**-----------------------------**/
/** Execution Comands **/
/**-----------------------------**/

run tenDaysPassed for 11

run aMonthPassed for 31
